package com.cg.controller;

import com.cg.client.AppClient;
import com.cg.dto.Result;
import com.cg.entity.Branch;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName BranchController
 * @Description TODO
 * @Author CG
 * @Date 2024/1/7 12:22
 **/
@RestController
@RequestMapping("/branch")
public class BranchController {

    @Resource
    private AppClient appClient;

    /**
     * 加载所有院区
     */
    @GetMapping("/queryBranchList")
    public Result<List<Branch>> queryBranchList(){
        return appClient.queryBranchList();
    }
}
